<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="ISO-8859-1"%>
<%@ page import = "quiz.Quiz" %>
<%@ page import = "java.util.ArrayList" %>
<%
	ArrayList<Quiz> quizzes = (ArrayList<Quiz>)request.getAttribute("quizzes");
	String tag = (String)request.getAttribute("tag");
	String name = tag + " tag";
%>
<jsp:include page="templates/header.jsp" flush="true">
	<jsp:param value = "<%= name %>" name = "title" />
</jsp:include>
<jsp:include page="templates/title_bar.jsp" flush = "true">
	<jsp:param value = "<%= name %>" name = "title" />
</jsp:include>
<div id = "content">
<div class = "center">

<%
	if (quizzes == null || quizzes.size() == 0) out.println("<div>No quizzes tagged with "+tag+"</div>");
	for (Quiz q: quizzes) {
		out.println("<div><a href = \"ShowSelectedQuiz?id="+q.getID()+"\">"+q.getName()+"</a></div>");
	}
%>
</div>
</div>
</div>
<jsp:include page="templates/footer.jsp" flush="true" />